﻿// ------------------------------------------------------------------------------
// <copyright file="BackButton.cs" company="skumaronline.com">
//    Copyright (C) 2012 Suresh Kumar T.
//
//    This program is free software; you can redistribute it and/or
//    modify it under the terms of the GNU General Public License
//    as published by the Free Software Foundation version 2
//    of the License.
//
//    This program is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU General Public License for more details.
//
//    http://www.gnu.org/licenses/gpl-2.0.html
//
// </copyright>
// ------------------------------------------------------------------------------

namespace StoreAppLib.Controls
{
    using Windows.UI.Xaml;
    using Windows.UI.Xaml.Controls;
    using Windows.UI.Xaml.Media;

    /// <summary>
    /// Back button
    /// </summary>
    public class BackButton : Button
    {
        /// <summary>
        /// Using a DependencyProperty as the backing store for ParentBackground.  This enables animation, styling, binding, etc...
        /// </summary>
        public static readonly DependencyProperty ParentBackgroundProperty =
            DependencyProperty.Register("ParentBackground", typeof(Brush), typeof(BackButton), new PropertyMetadata(null));   

        /// <summary>
        /// Initializes a new instance of the <see cref="BackButton" /> class.
        /// </summary>
        public BackButton()
        {
            this.DefaultStyleKey = typeof(BackButton);
        }

        /// <summary>
        /// Gets or sets parent background 
        /// </summary>
        public Brush ParentBackground
        {
            get { return (Brush)this.GetValue(ParentBackgroundProperty); }
            set { this.SetValue(ParentBackgroundProperty, value); }
        }     
    }
}
